/*
 * XML Type:  PresentmentMailResponse
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.PresentmentMailResponse
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML PresentmentMailResponse(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class PresentmentMailResponseImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.PresentmentMailResponse
{
    
    public PresentmentMailResponseImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName PRESACCTFROM$0 = 
        new javax.xml.namespace.QName("", "PRESACCTFROM");
    private static final javax.xml.namespace.QName MAIL$2 = 
        new javax.xml.namespace.QName("", "MAIL");
    
    
    /**
     * Gets the "PRESACCTFROM" element
     */
    public net.ofx.types.x2003.x04.PresentmentAccount getPRESACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PresentmentAccount target = null;
            target = (net.ofx.types.x2003.x04.PresentmentAccount)get_store().find_element_user(PRESACCTFROM$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "PRESACCTFROM" element
     */
    public void setPRESACCTFROM(net.ofx.types.x2003.x04.PresentmentAccount presacctfrom)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PresentmentAccount target = null;
            target = (net.ofx.types.x2003.x04.PresentmentAccount)get_store().find_element_user(PRESACCTFROM$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.PresentmentAccount)get_store().add_element_user(PRESACCTFROM$0);
            }
            target.set(presacctfrom);
        }
    }
    
    /**
     * Appends and returns a new empty "PRESACCTFROM" element
     */
    public net.ofx.types.x2003.x04.PresentmentAccount addNewPRESACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PresentmentAccount target = null;
            target = (net.ofx.types.x2003.x04.PresentmentAccount)get_store().add_element_user(PRESACCTFROM$0);
            return target;
        }
    }
    
    /**
     * Gets the "MAIL" element
     */
    public net.ofx.types.x2003.x04.Mail getMAIL()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.Mail target = null;
            target = (net.ofx.types.x2003.x04.Mail)get_store().find_element_user(MAIL$2, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "MAIL" element
     */
    public void setMAIL(net.ofx.types.x2003.x04.Mail mail)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.Mail target = null;
            target = (net.ofx.types.x2003.x04.Mail)get_store().find_element_user(MAIL$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.Mail)get_store().add_element_user(MAIL$2);
            }
            target.set(mail);
        }
    }
    
    /**
     * Appends and returns a new empty "MAIL" element
     */
    public net.ofx.types.x2003.x04.Mail addNewMAIL()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.Mail target = null;
            target = (net.ofx.types.x2003.x04.Mail)get_store().add_element_user(MAIL$2);
            return target;
        }
    }
}
